package com.jia.user.controller;

import com.jia.user.mapper.UserMapper;
import com.jia.user.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;



/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 陈佳
 * @since 2024-08-28
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserMapper userMapper;

    @GetMapping("/{id}")
    public User findUserById(@PathVariable Long id){
        User user = userMapper.selectById(id);
        return user;
    }
}

